package top.xunfong.system.model;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import top.xunfong.common.core.constant.SecurityConstants;
import top.xunfong.common.core.constant.ServiceNameConstants;
import top.xunfong.common.core.domain.R;
import top.xunfong.common.core.domain.model.LoginUserInfo;
import top.xunfong.system.factory.RemoteSysUserFallbackFactory;

/**
 * @author: xunfong
 * @date: 2025/10/17 10:10
 */

@FeignClient(contextId = "remoteSysUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSysUserFallbackFactory.class)
public interface RemoteSysUserService {

    @GetMapping("/sysUser/userInfo")
    R<LoginUserInfo> login(@RequestParam("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
